function [y] = calc_length(speed_calc)
t = 0 %Initial value for t
y = 0 %Initial value for y
x = 1 %initial value for x
h = 0.1 %Stepsize
final = 10

acceler_func = @acceleration_calc

while x < final
    %Get first derivative
    f1 = speed_calc(t, x, y, acceleration_calc);
    f2 = speed_calc(t + h/2, x, y + h*f1/2, acceleration_calc);
    f3 = speed_calc(t + h/2, x, y + h*f2/2, acceleration_calc);
    f4 = speed_calc(t + h, x, y+h*f3, acceleration_calc);
    t = t+h
    x = h*(f1 + 2*f2 + 2*f3 + f4)/6;
end